package org.example.exceptioncatch.demos.controller;

import java.util.concurrent.Callable;

public class MyFuture2 implements Callable<String> {


    @Override
    public String call() throws Exception {


        //主动抛出任务
        if (true) {
            Thread.sleep(1000);
            int i = 1 / 0;
        }


        return "线程池中的任务执行完成";
    }


}
